package com.xoa.service.informationsub;

import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

@Service
public class InformationSubService {
    /**
    * @author 程叶同
    * @date ` 14:19
    * @desc  编号生成
    */
    private static String getSerialNumbe(){
        String serialNume="";
        String template="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        char[] contain=template.toCharArray();
        Random random=new Random();
        for(int i=0;i<6;i++) {
            char c = contain[random.nextInt(contain.length)];
            serialNume+=c;
        }
        serialNume="XTD"+serialNume.toUpperCase()+new SimpleDateFormat("YYYYMMDDHHmmss").format(new Date());
        return serialNume;
    }

}
